package com.qianli.cashmama.trade.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.qianli.cashmama.trade.dao.TTradeContractDao;
import com.qianli.cashmama.trade.entity.TTradeContractEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

/**
 * User: zhihaoxie
 * Date: 2018-08-02
 * Time: 10:28:20.522
 */

@Repository
public class TTradeContractDaoImpl extends AbstractBaseMapper<TTradeContractEntity> implements TTradeContractDao {


    @Override
    public TTradeContractEntity selectOneByTradeNo(String tradeNo) {
        Map<String, Object> map = new HashMap<>();
        map.put("tradeNo", tradeNo);
        return getSqlSession().selectOne(getStatement("selectOneByTradeNo"), map);
    }

    @Override
    public Integer updateByTradeNo(TTradeContractEntity tTradeContractEntity) {
        return getSqlSession().update(getStatement("updateByTradeNo"), tTradeContractEntity);
    }

}